﻿namespace Budget.Silver.IncomeServiceReference
{
    public partial class IncomeTypeData
    {
        public override bool Equals(object obj)
        {
            var incomeType = obj as IncomeTypeData;
            if (incomeType != null)
            {
                return string.Equals(Name, incomeType.Name);
            }

            return false;
        }

        public override int GetHashCode()
        {
            return (Name != null ? Name.GetHashCode() : 0);
        }

        public override string ToString()
        {
            return Name;
        }
    }
}